

<?php if(isset($formErrors)): ?>
	<?php foreach($formErrors as $error): ?>
	<div><?php echo $error; ?></div>
	<?php endforeach; ?>
<?php endif; ?>

<?php if(isset($formMessages)): ?>
	<?php foreach($formMessages as $message): ?>
	<div><?php echo $message; ?></div>
	<?php endforeach; ?>
<?php endif; ?>

<?php echo form_open_multipart("cp/home/submit"); ?>
	<?php echo (isset($editItem)) ? form_hidden("id",$editItem->id) : ""; ?>
	<br />
	Title : <?php echo (isset($editItem)) ? form_input("title",$editItem->title) : form_input("title"); ?>
	<br />
	Enable : <?php echo (isset($editItem)) ? form_checkbox("enable","1",$editItem->enable) : form_checkbox("enable","1"); ?>
	<br />
	Description : <?php echo (isset($editItem)) ? form_textarea("description",$editItem->description) : form_textarea("description"); ?>
	<br />
	Image : <?php echo form_upload("image"); ?>
	<?php if(isset($editItem) && ! empty($editItem->image)): ?>
	<img src='<?php echo $editItem->image ?>' />
	<?php endif; ?>
	<br />
	Movie : <?php echo form_upload("movie"); ?>
	<br />
	<?php echo form_submit("submit","Submit"); ?>
	
<?php echo form_close(); ?>